﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Colover.Infrastructure;
using Colover.Enums;

namespace Colover.Models
{
	/// <summary>
	/// Article info.
	/// </summary>
    public partial class ArticleInfo : NotificationObject
    {
        public ArticleInfo() { }

        #region Fields
        private int id;
        private string guid = new Guid().ToString();
        private string title;
        private string author;
        private string authorUrl;
        private string authorEmail;
        private string metaUrl;
        private string metaWebsite;
        private string metaAuthor;
        private string summary;
        private string htmlContent;
        private string cover;
        private ArticleStatusValue status = ArticleStatusValue.Moderated;
        private int categoryId = 0;
        private bool showToPublic = true;
        private bool showToMember = true;
        private bool commentStatus = true;
        private int commentCount = 0;
        private int likeCount = 0;
        private int viewCount = 0;
        private DateTime submitTime = DateTime.Now;
        private DateTime lastUpdate = DateTime.Now;
        #endregion

        #region Properties
		/// <summary>
		/// Gets or sets the identifier.
		/// </summary>
		/// <value>The identifier.</value>
        public int Id
        {
            get { return id; }
            set
            {
                id = value;
                RaisePropertyChanged(() => Id);
            }
        }

		/// <summary>
		/// Gets or sets the GUID.
		/// </summary>
		/// <value>The GUID.</value>
        public string Guid
        {
            get { return guid; }
            set
            {
                guid = value;
                RaisePropertyChanged(() => Guid);
            }
        }

		/// <summary>
		/// Gets or sets the article title.
		/// </summary>
		/// <value>The article title.</value>
        public string Title
        {
            get { return title; }
            set
            {
                title = value;
                RaisePropertyChanged(() => Title);
            }
        }

		/// <summary>
		/// Gets or sets the author.
		/// </summary>
		/// <value>The author.</value>
        public string Author
        {
            get { return author; }
            set
            {
                author = value;
                RaisePropertyChanged(() => Author);
            }
        }

		/// <summary>
		/// Gets or sets the author URL.
		/// </summary>
		/// <value>The author URL.</value>
        public string AuthorUrl
        {
            get { return authorUrl; }
            set
            {
                authorUrl = value;
                RaisePropertyChanged(() => AuthorUrl);
            }
        }

		/// <summary>
		/// Gets or sets the author email.
		/// </summary>
		/// <value>The author email.</value>
        public string AuthorEmail
        {
            get { return authorEmail; }
            set
            {
                authorEmail = value;
                RaisePropertyChanged(() => AuthorEmail);
            }
        }

		/// <summary>
		/// Gets or sets the meta URL.
		/// </summary>
		/// <value>The meta URL.</value>
        public string MetaUrl
        {
            get { return metaUrl; }
            set
            {
                metaUrl = value;
                RaisePropertyChanged(() => MetaUrl);
            }
        }

		/// <summary>
		/// Gets or sets the meta website.
		/// </summary>
		/// <value>The meta website.</value>
        public string MetaWebsite
        {
            get { return metaWebsite; }
            set
            {
                metaWebsite = value;
                RaisePropertyChanged(() => MetaWebsite);
            }
        }

		/// <summary>
		/// Gets or sets the meta author.
		/// </summary>
		/// <value>The meta author.</value>
        public string MetaAuthor
        {
            get { return metaAuthor; }
            set
            {
                metaAuthor = value;
                RaisePropertyChanged(() => MetaAuthor);
            }
        }

		/// <summary>
		/// Gets or sets the summary.
		/// </summary>
		/// <value>The summary.</value>
        public string Summary
        {
            get { return summary; }
            set
            {
                summary = value;
                RaisePropertyChanged(() => Summary);
            }
        }

		/// <summary>
		/// Gets or sets the content of the html.
		/// </summary>
		/// <value>The content of the html.</value>
        public string HtmlContent
        {
            get { return htmlContent; }
            set
            {
                htmlContent = value;
                RaisePropertyChanged(() => HtmlContent);
            }
        }

		/// <summary>
		/// Gets or sets the cover.
		/// </summary>
		/// <value>The cover.</value>
        public string Cover
        {
            get { return cover; }
            set
            {
                cover = value;
                RaisePropertyChanged(() => Cover);
            }
        }

		/// <summary>
		/// Gets or sets the status.
		/// </summary>
		/// <value>The status.</value>
        public ArticleStatusValue Status
        {
            get { return status; }
            set
            {
                status = value;
                RaisePropertyChanged(() => Status);
            }
        }

		/// <summary>
		/// Gets or sets the category identifier.
		/// </summary>
		/// <value>The category identifier.</value>
        public int CategoryId
        {
            get { return categoryId; }
            set
            {
                categoryId = value;
                RaisePropertyChanged(() => CategoryId);
            }
        }

		/// <summary>
		/// Gets or sets a value indicating whether this <see cref="Colover.Models.ArticleInfo"/> show to public.
		/// </summary>
		/// <value><c>true</c> if show to public; otherwise, <c>false</c>.</value>
        public bool ShowToPublic
        {
            get { return showToPublic; }
            set
            {
                showToPublic = value;
                RaisePropertyChanged(() => ShowToPublic);
            }
        }

		/// <summary>
		/// Gets or sets a value indicating whether this <see cref="Colover.Models.ArticleInfo"/> show to member.
		/// </summary>
		/// <value><c>true</c> if show to member; otherwise, <c>false</c>.</value>
        public bool ShowToMember
        {
            get { return showToMember; }
            set
            {
                showToMember = value;
                RaisePropertyChanged(() => ShowToMember);
            }
        }

		/// <summary>
		/// Gets or sets a value indicating whether this <see cref="Colover.Models.ArticleInfo"/> comment status.
		/// </summary>
		/// <value><c>true</c> if comment status; otherwise, <c>false</c>.</value>
        public bool CommentStatus
        {
            get { return commentStatus; }
            set
            {
                commentStatus = value;
                RaisePropertyChanged(() => CommentStatus);
            }
        }

		/// <summary>
		/// Gets or sets the comment count.
		/// </summary>
		/// <value>The comment count.</value>
        public int CommentCount
        {
            get { return commentCount; }
            set
            {
                commentCount = value;
                RaisePropertyChanged(() => CommentCount);
            }
        }

		/// <summary>
		/// Gets or sets the like count.
		/// </summary>
		/// <value>The like count.</value>
        public int LikeCount
        {
            get { return likeCount; }
            set
            {
                likeCount = value;
                RaisePropertyChanged(() => LikeCount);
            }
        }

		/// <summary>
		/// Gets or sets the view count.
		/// </summary>
		/// <value>The view count.</value>
        public int ViewCount
        {
            get { return viewCount; }
            set
            {
                viewCount = value;
                RaisePropertyChanged(() => ViewCount);
            }
        }

		/// <summary>
		/// Gets or sets the submit time.
		/// </summary>
		/// <value>The submit time.</value>
        public DateTime SubmitTime
        {
            get { return submitTime; }
            set
            {
                submitTime = value;
                RaisePropertyChanged(() => SubmitTime);
            }
        }

		/// <summary>
		/// Gets or sets the last update.
		/// </summary>
		/// <value>The last update.</value>
        public DateTime LastUpdate
        {
            get { return lastUpdate; }
            set
            {
                lastUpdate = value;
                RaisePropertyChanged(() => LastUpdate);
            }
        }
        #endregion
    }
}
